<?php

class Db_Tables2_DccCompaniesLevel
{
	function __construct() {
		$this->maozhua_wb = Zend_Registry::get("maozhua_wb");
	}
	
	function CompanyInit($company_id)
	{
		$init = array(
			"H" => array(
				"level_instruction" => "紧急任务",
				"call_days" => 1,
				"sequene" => 1
			),
			"A" => array(
				"level_instruction" => "A级任务",
				"call_days" => 3,
				"sequene" => 2
			),
			"B" => array(
				"level_instruction" => "B级任务",
				"call_days" => 7,
				"sequene" => 3
			),
			"C" => array(
				"level_instruction" => "C级任务",
				"call_days" => 30,
				"sequene" => 4
			)
		);
		
		foreach($init as $level_name => $info)
		{
			$data = array(
				"company_id" => $company_id,
				"level_name" => $level_name,
				"level_instruction" => $info['level_instruction'],
				"call_days" => $info['call_days'],
				"sequene" => $info['sequene']
			);

			$this->maozhua_wb->insert("dcc_companies_level", $data);
		}
		
		return TRUE;
	}
}